package com.htj.powerbank.entity;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//alt + ins
@Data
public class User {
    private Integer id;
    private String name;
    private String password;
    private String sex;
    private String email;
    private String phone;
    private String avatar;
    private String city;

    private Integer imp;
    private String status;
    private String hobby;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;

    @Override
    public String toString() {
        return  "{" +
                "\"id\":" + "\"" + id + "\"" +
                ", \"name\":" + "\"" + name + "\"" +
                ", \"password\":" + "\"" + password + "\"" +
                ", \"sex\":" + "\"" + sex + "\"" +
                ", \"email\":" + "\"" + email + "\"" +
                ", \"phone\":" + "\"" + phone + "\"" +
                ", \"avatar\":" + "\"" + avatar + "\"" +
                ", \"city\":" + "\"" + city + "\"" +
                ", \"imp\":" + "\"" + imp + "\"" +
                ", \"status\":" + "\"" + status + "\"" +
                ", \"hobby\":" + "\"" + hobby + "\"" +
                ", \"date\":" + "\"" + date + "\"" +
                '}';
    }
}
